// 静态路由配置
import Vue from 'vue'
import Router from 'vue-router'

// 页面注册
import Login from '@/page/login/login'
import DriverLive from '@/page/DriverLive/DriverLive'
import DataAnalysis from '@/page/DataAnalysis/DataAnalysis'
import SafetyWarning from '@/page/SafetyWarning/SafetyWarning'
import notfoundPage from '@/page/404/404'
import tracker from '@/page/trackre/trackre'
Vue.use(Router)

// 实例化
export default new Router({

  mode: 'history',
 // base: '/dist/', //加上这一行


  routes: [
    {
      path: '/',
      name: 'Login',
      component: Login,
      meta: {
        title: '欢迎使用【北斗车辆管理平台】'
      }
    },
    {
      path: '/driverlive',
      name: 'DriverLive',
      component: DriverLive,
      meta: {
        title: '设备信息'
      }
    },
    {
      path: '/dataanalysis',
      name: 'DataAnalysis',
      component: DataAnalysis,
      meta: {
        title: '统计分析'
      }
    },
    {
      path: '/safetywarning',
      name: 'SafetyWarning',
      component: SafetyWarning,
      meta: {
        title: '安全警告'
      }
    },

    {
      path:'/tracker',
      name:'tracker',
      component: tracker,
      meta:{
        title: '轨迹'
      }
    },

    
    {
      path: '/404',
      name: '404 not found',
      component: notfoundPage,
      meta: {
        title: '未找到页面'
      }
    },

    

    {
      path: "*", // 此处需特别注意置于最底部
      redirect: "/404"
    },


  ]
});
